import { request } from "./request";

export function updatedName(uId, uName) {
  return request({
    url: "/user/updateUserName",
    method: "post",
    params: {
      uId,
      uName,
    },
  });
}

export function updatedImg(file, uId) {
  return request({
    url: "/user/updateuserimg",
    method: "post",
    data: file,
    params: {
      uId,
    },
    processData: false,
    contentType: false,
  });
}

export function updatedShou(cgState, giId, uId) {
  return request({
    url: "/gametype/collectionGame",
    method: "get",
    params: {
      cgState,
      giId,
      uId,
    },
  });
}

export function addHistory(giId, uId) {
  return request({
    url: "/user/addHistory",
    method: "post",
    params: {
      giId,
      uId,
    },
  });
}
